/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const reportRouter = {
  path: '/views/reportStatistics',
  component: Layout,
  //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
  redirect: 'noRedirect',
  // alwaysShow: true, //一直显示根路由
  name: 'reportStatistics',
  meta: {
    title: '报表统计',
    icon: 'report',
    roles: ['admin', 'user']
  }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
  children: [
    {
      path: '/views/reportStatistics/financeReport',
      component: () => import('@/views/reportStatistics/financeReport/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '财务报表',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/reportStatistics/financeReport/operatingStatement',
          component: () => import('@/views/reportStatistics/financeReport/operatingStatement'), // 经营报表
          name: 'operatingStatement',
          meta: {
            title: '经营报表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/financeReport/customerProfitability',
          component: () => import('@/views/reportStatistics/financeReport/customerProfitability'), // 客户创利统计
          name: 'customerProfitability',
          meta: {
            title: '客户创利统计',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/financeReport/salesOrderSummary',
          component: () => import('@/views/reportStatistics/financeReport/salesOrderSummary'), // 销售单汇总表
          name: 'salesOrderSummary',
          meta: {
            title: '销售单汇总表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/financeReport/salesGrossProfit',
          component: () => import('@/views/reportStatistics/financeReport/salesGrossProfit'), // 销售毛利明细表
          name: 'salesGrossProfit',
          meta: {
            title: '销售毛利明细表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/financeReport/salesDiscount',
          component: () => import('@/views/reportStatistics/financeReport/salesDiscount'), // 销售优惠汇总表
          name: 'salesDiscount',
          meta: {
            title: '销售优惠汇总表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/financeReport/cashBankStatistics',
          component: () => import('@/views/reportStatistics/financeReport/cashBankStatistics'), // 现金银行统计表
          name: 'cashBankStatistics',
          meta: {
            title: '现金银行统计表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/financeReport/logisticsExchanges',
          component: () => import('@/views/reportStatistics/financeReport/logisticsExchanges'), // 物流往来对账
          name: 'logisticsExchanges',
          meta: {
            title: '物流往来对账',
            roles: ['admin', 'user']
          }
        },
      ]
    },
    {
      path: '/views/reportStatistics/salesReport',
      component: () => import('@/views/reportStatistics/salesReport/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '销售报表',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/reportStatistics/salesReport/salesOrderExecution',
          component: () => import('@/views/reportStatistics/salesReport/salesOrderExecution'), // 销售订单执行情况
          name: 'salesOrderExecution',
          meta: {
            title: '销售订单执行情况',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/salesReport/salesOrderStatistics',
          component: () => import('@/views/reportStatistics/salesReport/salesOrderStatistics'), // 销售订单统计
          name: 'salesOrderStatistics',
          meta: {
            title: '销售订单统计',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/salesReport/salesOrderDetailsQuery',
          component: () => import('@/views/reportStatistics/salesReport/salesOrderDetailsQuery'), // 销售订单明细查询
          name: 'salesOrderDetailsQuery',
          meta: {
            title: '销售订单明细查询',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/salesReport/statisticsByCustomer',
          component: () => import('@/views/reportStatistics/salesReport/statisticsByCustomer'), // 销售统计(按客户)
          name: 'statisticsByCustomer',
          meta: {
            title: '销售统计(按客户)',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/salesReport/salesStatisticsByCommodity',
          component: () => import('@/views/reportStatistics/salesReport/salesStatisticsByCommodity'), // 销售统计(按商品)
          name: 'salesStatisticsByCommodity',
          meta: {
            title: '销售统计(按商品)',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/salesReport/statisticsBySalesman',
          component: () => import('@/views/reportStatistics/salesReport/statisticsBySalesman'), // 销售统计(按经手人)
          name: 'statisticsBySalesman',
          meta: {
            title: '销售统计(按经手人)',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/salesReport/salesDtails',
          component: () => import('@/views/reportStatistics/salesReport/salesDtails'), // 销售明细查询
          name: 'salesDtails',
          meta: {
            title: '销售明细查询',
            roles: ['admin', 'user']
          }
        },
      ]
    },
    {
      path: '/views/reportStatistics/inventoryReport',
      component: () => import('@/views/reportStatistics/inventoryReport/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '库存报表',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/reportStatistics/inventoryReport/inventoryQuery',
          component: () => import('@/views/reportStatistics/inventoryReport/inventoryQuery'),// 库存查询
          name: 'inventoryQuery',
          meta: {
            title: '库存查询',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/inventoryReport/commodityJXC',
          component: () => import('@/views/reportStatistics/inventoryReport/commodityJXC'), // 商品进销存表
          name: 'commodityJXC',
          meta: {
            title: '商品进销存表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/inventoryReport/inAndOutDetailsQuery',
          component: () => import('@/views/reportStatistics/inventoryReport/inAndOutDetailsQuery'), // 出入库明细查询
          name: 'inAndOutDetailsQuery',
          meta: {
            title: '出入库明细查询',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/inventoryReport/inventoryChangeDetails',
          component: () => import('@/views/reportStatistics/inventoryReport/inventoryChangeDetails'), // 库存变动明细
          name: 'inventoryChangeDetails',
          meta: {
            title: '库存变动明细',
            roles: ['admin', 'user']
          }
        },
      ]
    },
    {
      path: '/views/reportStatistics/arAndapReport',
      component: () => import('@/views/reportStatistics/arAndapReport/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '应收应付报表',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/reportStatistics/arAndapReport/arAndapSummary',
          component: () => import('@/views/reportStatistics/arAndapReport/arAndapSummary'),// 应收应付汇总表
          name: 'arAndapSummary',
          meta: {
            title: '应收应付汇总表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/Inquire',
          component: () => import('@/views/Inquire/index.vue'),// 单据查询
          name: 'Inquire',
          meta: {
            title: '单据查询',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/arAndapReport/accountsReceivable',
          component: () => import('@/views/reportStatistics/arAndapReport/accountsReceivable'), // 应收款汇总表
          name: 'accountsReceivable',
          meta: {
            title: '应收款汇总表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/arAndapReport/accountsPayable',
          component: () => import('@/views/reportStatistics/arAndapReport/accountsPayable'), // 应付款汇总表
          name: 'accountsPayable',
          meta: {
            title: '应付款汇总表',
            roles: ['admin', 'user']
          }
        },
      ]
    },
    {
      path: '/views/reportStatistics/purchaseReport',
      component: () => import('@/views/reportStatistics/purchaseReport/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '采购报表',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/reportStatistics/purchaseReport/orderExecution',
          component: () => import('@/views/reportStatistics/purchaseReport/orderExecution'),// 采购订单执行情况
          name: 'orderExecution',
          meta: {
            title: '采购订单执行情况',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/purchaseReport/orderStatistics',
          component: () => import('@/views/reportStatistics/purchaseReport/orderStatistics'), // 采购订单统计
          name: 'orderStatistics',
          meta: {
            title: '采购订单统计',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/purchaseReport/orderDetailsQuery',
          component: () => import('@/views/reportStatistics/purchaseReport/orderDetailsQuery'), // 采购订单明细查询
          name: 'orderDetailsQuery',
          meta: {
            title: '采购订单明细查询',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/purchaseReport/purchaseDtails',
          component: () => import('@/views/reportStatistics/purchaseReport/purchaseDtails'), // 采购明细查询
          name: 'purchaseDtails',
          meta: {
            title: '采购明细查询',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/purchaseReport/statisticsByCommodity',
          component: () => import('@/views/reportStatistics/purchaseReport/statisticsByCommodity'), // 采购统计(按商品)
          name: 'statisticsByCommodity',
          meta: {
            title: '采购统计(按商品)',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/purchaseReport/statisticsBySupplier',
          component: () => import('@/views/reportStatistics/purchaseReport/statisticsBySupplier'), // 采购统计(按供应商)
          name: 'statisticsBySupplier',
          meta: {
            title: '采购统计(按供应商)',
            roles: ['admin', 'user']
          }
        },
      ]
    },
  ]
}
export default reportRouter
